

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='zh-CN' xml:lang='zh-CN' xmlns='http://www.w3.org/1999/xhtml'>

<head>
<title>Go语言的时间格式风格详解 - OPEN 开发经验库</title>
<meta content="text/html; charset=utf-8" http-equiv=content-type>
<meta name=robots content=index,follow>
<meta name=keywords content="Go语言,Google Go开发">
<meta name=description content="go 的time package 提供了time.Format函数，用来对时间进行格式化输出。

类似的还有time.Parse用来解析字符串类型的时间到time.Time。这是两个互逆的函数。

问题是，go 采用的格式化 layout 和我们以往所用的任何经验都不同。以至于初次接触总是一头雾 水。

其实 go 提供的这个 layout 对算法的实现非常科学高效，而且很规律。下面我们详细分解下。

">
<link rel="shortcut icon" href="/lib/favicon.ico">
<link rel=copyright href="http://www.open-open.com/">



<link type="text/css" rel="stylesheet" href="/lib/syntaxhighlighter_2.1.382/styles/shCore.css"/>
<link type="text/css" rel="stylesheet" href="/lib/syntaxhighlighter_2.1.382/styles/shThemeEclipse.css"/>
 
<style type="text/css" media="screen, projection">
		/*<![CDATA[*/
			@import "/lib/css/common.css";
			@import "/lib/css/main.css";
			@import "/lib/css/thickbox.css";
			@import "/lib/css/jquery.ui.css";
		/*]]>*/
</style> 



<script type="text/javascript">
	var rooturl="/lib";
	var wgDocKey='1372919144628';
	var wgDocTitle='Go语言的时间格式风格详解';
	var wgDocStatusFlag='';
	var wgUserFolders=null;
	var wgDownFrame=null;
	var wgCostByUser=null;
	var wgDocFavoriteByUser=false;
	var wgDocScoreByUser=null;
	var wgUserLogined=0;
	var tb_pathToImage = "/lib/images/loadingAnimation.gif";


</script>
</head>
<body id=view>

        


<div id=topnav>
<div id=Personal>
	
		<a href="/lib/members/login?keepThis=true&TB_iframe=true&height=177&width=280" title="登录OPEN经验库" class="thickbox"">登录</a>&nbsp;&nbsp;
		<a href="/lib/members/register?keepThis=true&TB_iframe=true&height=460&width=710" title="注册新的账号" class="thickbox">注册</a>
	
		
</div>
<div id=topmenu>
<ul>
		<li><a title=Java开源 href="http://www.open-open.com/">Java开源</a></li>
		<li><a title=PHP开源 href="http://www.php-open.com/">PHP开源</a></li>
		<li><a title=JS脚本大全 href="http://www.open-open.com/ajax/">JS脚本大全</a></li>
		<li><a title=OPEN家园 href="http://www.open-open.com/home/">OPEN家园</a></li>
		<li class=selected>OPEN经验库</li>
		<li><a title='OPEN文档频道' href="http://www.open-open.com/doc/">OPEN文档</a></li>
		<li><a title='OPEN资讯频道' href="http://www.open-open.com/news/">OPEN资讯</a></li>
		<li><a title='OPEN论坛频道' href="http://www.open-open.com/bbs">OPEN论坛</a></li>
		

</ul>
</div>
</div>
<!--end top nav-->
<div id=head>
<div id=head-logo><a title=OPEN开发经验库 href="http://www.open-open.com/lib/"><img border=0 alt=OPEN开发经验库 src="/lib/images/logo.jpg"></a></div>
<div id=head-search>
<form method=get name=search action="/lib/search" accept-charset="GBK" onsubmit="document.charset='GBK';">

<table border=0 cellspacing=0 cellpadding=0>
		
		<tbody>
				<tr>
						<td align=left>
							<input id=searchinput maxlength="1048" style="height: 23px;font-size:18px"  value="" x-webkit-speech size=45 name=q>
							<input id=searchbutton value="经验搜索" type="submit" style="height: 28px;font-size:17">
							<input id=od  type=hidden name=od value="0">
&nbsp;&nbsp;&nbsp;&nbsp;<font style="font-size: 9.5pt"><b>推荐：</b></font><a href="http://www.miniui.com/demo/#src=datagrid/celledit.html" title="jQuery MiniUI，Web界面控件库！" target="_blank" rel="nofollow"><font color="red" style="font-size: 9.5pt"><b>jQuery MiniUI，Web界面控件库！</b></font></a>
						</td>
						</tr>
		</tbody>
</table>
</form>

</div>
<div id=head-ad>

</div>

</div>
<!-- end head -->

<div id=content>
<div id=content-nav>
<a href="/lib/list/all">所有分类</a>

	&nbsp;&gt;&nbsp;
	<a href="/lib/list/36">开发语言与工具</a>

	&nbsp;&gt;&nbsp;
	<a href="/lib/list/211">Google Go开发</a>

</div>


<div id=view-main>


<div id=view-titleh>
<div id=view-title>
	<h3>Go语言的时间格式风格详解</h3>
</div>
<div id=view-summary>
<table>
		<tbody>
				<tr>
						<td><strong>您的评价</strong>:</td>
						<td>
						<div id=rate class=rate-container><span id=star1 class=star-big-off title=很差>&nbsp;</span><span id=star2 class=star-big-off title=较差>&nbsp;</span><span id=star3 class=star-big-off title=还行>&nbsp;</span><span
								id=star4 class=star-big-off title=不错>&nbsp;</span><span id=star5 class=star-big-off title=力荐>&nbsp;</span></div>
						</td>
						<td width=30>
						<div id=rate-tip></div>
						</td>
						
						<td>
						<div id=favorite-container><span class="icon favorite">&nbsp;</span><a id=favorite href="javascript:void(0)"><strong>收藏该经验</strong></a>&nbsp;&nbsp;&nbsp;&nbsp;
						 </div>

</td>
				</tr>
		</tbody>
</table>
<div id=favorite-box>
<table>
		<tbody>
				<tr>
						<td width=70 align=right>文件夹</td>
						<td><select id=fav_folderlist name=folder>
								<option selected value=0>请选择...</option>
								<option id=newfolder-sp disabled value="">-------------</option>
								<option value=-1>新增文件夹...</option>
						</select></td>
				</tr>
				<tr style="display: none" id=newfolder-input>
						<td align=right>新增文件夹</td>
						<td><input id=fav_newfolder maxlength=50 type=text name=newfolder></td>
				</tr>
				<tr>
						<td align=right>标签</td>
						<td><input id=fav_tags maxlength=135 size=20 type=text name=tags></td>
				</tr>
				<tr>
						<td></td>
						<td colspan=2>(多个标签用逗号分隔)</td>
				</tr>
		</tbody>
</table>
</div>

</div>

</div>


<div id=readercontainer>
 <div id="toc"></div>
<!-- google_ad_section_start -->
<h2>time package</h2>
<p>go 的time package 提供了time.Format函数，用来对时间进行格式化输出。</p>
<p>类似的还有time.Parse用来解析字符串类型的时间到time.Time。这是两个互逆的函数。</p>
<p>问题是，go 采用的格式化 layout 和我们以往所用的任何经验都不同。以至于初次接触总是一头雾 水。</p>
<p>其实 go 提供的这个 layout 对算法的实现非常科学高效，而且很规律。下面我们详细分解下。</p>
<h2>直接上个对应表</h2>
<p>前面是含义，后面是 go 的表示值,多种表示,逗号","分割</p>
<ul>
<li>月份 1,01,Jan,January</li>
<li>日　 2,02,_2</li>
<li>时　 3,03,15,PM,pm,AM,am</li>
<li>分　 4,04</li>
<li>秒　 5,05</li>
<li>年　 06,2006</li>
<li>时区 -07,-0700,Z0700,Z07:00,-07:00,MST</li>
<li>周几 Mon,Monday</li>
</ul>
<p>您看出规律了么！哦是的，你发现了，这里面没有一个是重复的，所有的值表示都唯一对应一个时间部分。并且涵盖了很多格式组合。</p>
<h3>比如小时的表示(原定义是下午3时，也就是15时)</h3>
<ul>
<li>3 用12小时制表示，去掉前导0</li>
<li>03 用12小时制表示，保留前导0</li>
<li>15 用24小时制表示，保留前导0</li>
<li>03pm 用24小时制am/pm表示上下午表示，保留前导0</li>
<li>3pm 用24小时制am/pm表示上下午表示，去掉前导0</li>
</ul>
<p>又比如月份</p>
<ul>
<li>1 数字表示月份，去掉前导0</li>
<li>01 数字表示月份，保留前导0</li>
<li>Jan 缩写单词表示月份</li>
<li>January 全单词表示月份</li>
</ul>
<h3>实例对应</h3>
<p>真实时间：我的UTC时间是 2013年12月5日，我的本地时区是Asia</p>
<p>字符表示：　　2013 12 5 Asia</p>
<p>Go Layout：　2006 01 2 MST</p>
<p>真实时间：我的UTC时间是 2013年12月22点，我的本地时区是Asia</p>
<p>字符表示：　　2013 12 22 Asia</p>
<p>Go Layout：　2006 01 15 MST</p>
<p>是滴，上面这个时间是合法的，虽然没有说是那一天，但是说了小时</p>
<p>而所有这些数字的顺序正好是1,2,4,5,6,7和一个时区MST</p>
<p>其实还有一个秒的 repeated digits for fractional seconds 表示法</p>
<p>用的是 0和9 ,很少用，源代码里面是这样写的</p>
<div id="highlighter_112464" class="syntaxhighlighter ">
<div class="lines">
<div class="line alt1"><pre class="brush:cpp; toolbar: true; auto-links: false;">stdFracSecond0                          // ".0", ".00", ... , trailing zeros included
stdFracSecond9                          // ".9", ".99", ..., trailing zeros omitted</pre><br />
</div>
</div>
</div>
<h2>那些分界符</h2>
<p>除了那些值之外的都是分界符号，自然匹配了，直接举例子吧</p>
<p>字符表示：　　2013-12 21 Asia</p>
<p>Go Layout：　2006-01 15 MST</p>
<p>字符表示：　　2013年12月21时 时区Asia</p>
<p>Go Layout：　2006年01月15时 时区MST</p>
<p>好了，您是否感觉这个表示方法兼容度更好，适应性更强呢，更容易记忆呢。</p>


</div>

<div style="margin-top: 10px;margin-bottom: 2px;">
<script type="text/javascript"><!--
google_ad_client = "pub-7963911354665843";
/* 728x90, 创建于 11-1-27 */
google_ad_slot = "5890482646";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>

			<table width='100%'><tr>
				<td  valign='top' width="49%" class="Related">
                <div style="border-bottom: 1px #ccc solid;margin-top: 5px"><strong>相关资讯</strong> 　—　<a href="http://www.open-open.com/news" target="_blank" rel="nofollow">更多</a></div>
            	<ul>
            		
            	     <li><a href="http://www.open-open.com/news/view/1894f94" target="_blank" rel="nofollow" title="使用Go语言一段时间的感受">使用Go语言一段时间的感受</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/9825e0" target="_blank" rel="nofollow" title="走进 Google 的 Go 语言">走进 Google 的 Go 语言</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/8465e6" target="_blank" rel="nofollow" title="Go 语言的错误处理机制引发争议">Go 语言的错误处理机制引发争议</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/14a867b" target="_blank" rel="nofollow" title="Go 语言的高级并发模式">Go 语言的高级并发模式</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1c0a316" target="_blank" rel="nofollow" title="从零到 Go：24 小时内登上 Google 主页的 Go 语言应用“火鸡”doodle 开发纪实">从零到 Go：24 小时内登上 Google 主页的 Go 语言应用“火鸡”doodle 开发纪实</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1dde1dc" target="_blank" rel="nofollow" title="未来的云计算语言？Go 在 Google 内部崛起">未来的云计算语言？Go 在 Google 内部崛起</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1097813" target="_blank" rel="nofollow" title="为什么 SoundCloud 要使用 Go 语言以及如何使用">为什么 SoundCloud 要使用 Go 语言以及如何使用</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/13cc91c" target="_blank" rel="nofollow" title="谈一点对 go 和 erlang 两门语言的体会">谈一点对 go 和 erlang 两门语言的体会</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/99d0f6" target="_blank" rel="nofollow" title="Go语言 - 清晰，优雅，但却是错的">Go语言 - 清晰，优雅，但却是错的</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/327263" target="_blank" rel="nofollow" title="为什么不使用Go语言呢？">为什么不使用Go语言呢？</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/19a059f" target="_blank" rel="nofollow" title="用 Google App Engine 开发 Go 语言应用的简明教程">用 Google App Engine 开发 Go 语言应用的简明教程</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/58b627" target="_blank" rel="nofollow" title="Go语言的可视化开发工具，LiteIDE x14.0发布">Go语言的可视化开发工具，LiteIDE x14.0发布</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/6836b0" target="_blank" rel="nofollow" title="Go 编程语言刚发布了 Go 1 released了！">Go 编程语言刚发布了 Go 1 released了！</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/19c5949" target="_blank" rel="nofollow" title="简单而强大的Go语言ORM框架 ，xorm v0.3.1 发布,">简单而强大的Go语言ORM框架 ，xorm v0.3.1 发布,</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/67ae4c" target="_blank" rel="nofollow" title="Go 语言 4 周岁生日">Go 语言 4 周岁生日</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/13696de" target="_blank" rel="nofollow" title="为什么Android应该转为Go语言开发？">为什么Android应该转为Go语言开发？</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/e92d7e" target="_blank" rel="nofollow" title="为什么我不会舍弃 Python 投奔 Go 语言">为什么我不会舍弃 Python 投奔 Go 语言</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/15be16c" target="_blank" rel="nofollow" title="开源书籍《Go Web编程》《Build Web Application with Golang》">开源书籍《Go Web编程》《Build Web Application with Golang》</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1f9e6d7" target="_blank" rel="nofollow" title="Google抛弃C语言，采用Go语言重写Go编译器">Google抛弃C语言，采用Go语言重写Go编译器</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1ce4e74" target="_blank" rel="nofollow" title="为什么 C++ 程序员不想改用 Go 语言">为什么 C++ 程序员不想改用 Go 语言</a></li>            
            	     
            	     
            	</ul>
        		 <div style="clear: both; font-size: 1px; line-height: 0;"></div>
            </td>
			<td width="5px"></td>
			<td valign='top' width="49%" class="Relatedb">
			 	<div style="border-bottom: 1px #ccc solid;margin-top: 5px"><strong>相关文档</strong> 　—　<a href="http://www.open-open.com/doc" rel="nofollow" target="_blank">更多</a></div>
            	<ul >
            		
            	     <li><a  href="http://www.open-open.com/doc/view/8d63d4cb4f7f4fbe9a890432b548faa8" rel="nofollow" target="_blank" title="Effective Go.pdf">Effective Go.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/444b4b920e054b2298ec05cca80631b5" rel="nofollow" target="_blank" title="Google Go初级读本.pdf">Google Go初级读本.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/8aa3a31dca5f4431a2e30a9183469c97" rel="nofollow" target="_blank" title="Google Go 编程语言.pdf">Google Go 编程语言.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/db4a3083bf7345db830214933ff75c59" rel="nofollow" target="_blank" title="Google Go 编程语言.pdf">Google Go 编程语言.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/23b01993ee2d4ea1b51ca4fe3e753d5c" rel="nofollow" target="_blank" title="Go 语言网络编程.pdf">Go 语言网络编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/cad7048e32b04b4985828b97bfe40c1c" rel="nofollow" target="_blank" title="Go 语言最佳实践.pdf">Go 语言最佳实践.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/a0dda777feec49ac96ebf71d175037f7" rel="nofollow" target="_blank" title="Go 语言程序设计(全).pdf">Go 语言程序设计(全).pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/72928010dd424fe2bd3605b1fd5a7cd6" rel="nofollow" target="_blank" title="Go 语言文档.doc">Go 语言文档.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/552bc864c7da4d439936709b387357e0" rel="nofollow" target="_blank" title="Go 语言文档.doc">Go 语言文档.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/e72cec70e5fe45c58b554bb7755235fd" rel="nofollow" target="_blank" title="Go 语言文档.doc">Go 语言文档.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/7c041445129b414d884536c125a35bac" rel="nofollow" target="_blank" title="Go 语言编程.pdf">Go 语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/9b3e3101669640cfad71e12e1719fbd1" rel="nofollow" target="_blank" title="Go 语言编程.pdf">Go 语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/2fbc468458994cb4b60e790ef65cad2d" rel="nofollow" target="_blank" title="Go语言编程.pdf">Go语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/27a7bd97e8614662b02188462ac5d1f8" rel="nofollow" target="_blank" title="Go 语言编程.pdf">Go 语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/d4258fc14d8d4622a092d89106b40121" rel="nofollow" target="_blank" title="Go语言WEB开发.pdf">Go语言WEB开发.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/7ee3f2fc285b46638aad59132cc0616c" rel="nofollow" target="_blank" title="Go 编程语言简介.doc">Go 编程语言简介.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/3811f9426dce4ff9838209f46d1be5e3" rel="nofollow" target="_blank" title="Go语言学习笔记.pdf">Go语言学习笔记.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/5390ffdb367a4528a45cbee5b6346525" rel="nofollow" target="_blank" title="Go 语言程序设计.pdf">Go 语言程序设计.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/106a5a5d3890484ab514e116dca36763" rel="nofollow" target="_blank" title="Go语言程序设计.pdf">Go语言程序设计.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/020181b97f6e499b8e4580e6edaf1a55" rel="nofollow" target="_blank" title="谷歌GO语言集成开发环境LiteIDE使用帮助.pdf">谷歌GO语言集成开发环境LiteIDE使用帮助.pdf</a></li>            
            	    
            	</ul>
            </td>
			</tr></table>
<div style="margin-top: 10px;margin-bottom: 10px;">
<div id="baiduad1" style="margin-bottom: 5px;">
</div>	

</div>

<div style="margin-top: 10px;margin-bottom: 2px;">
<script type="text/javascript"><!--
google_ad_client = "pub-7963911354665843";
/* 728x90, 创建于 11-1-27 */
google_ad_slot = "5890482646";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>

<div style="margin-top: 10px;margin-bottom: 10px;">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7963911354665843";
/* 横向单元 */
google_ad_slot = "6546082871";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>	
	
</div>

<div id=view-side>
<div id=upload-box class="box-blue angle">
<div class=box-bg>
<div class=box-body><a id=upload class=upload href="#"></a>
</div>
</div>
</div>

<div class="box-blue angle-footer">
<div class=box_1></div>
<div class=box_2></div>
<div class=box_3></div>
<div class=box-bg>
<div class=box-title>内容信息</div>
<div id=docinfo class=box-body>
<div id=doc-score><span id=score-stars class=stars-big-0 title=经验评价得分：0.0分>&nbsp;</span><span id=score-num>0.0</span><br>
<div id=score-ratecount>(已有0个人评价)</div>
<div id=score-scale>
<span class="starscale stars-small-10" title=力荐>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-8" title=不错>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-6" title=还行>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-4" title=较差>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-2" title=很差>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
</div>
</div>
<div class=sp></div>
<div id=doc-status>
<span class=item>收藏：0人</span>

<span class=item>发布时间：2013-07-04 16:11:33</span>
</div>
</div>
</div>
</div>

<div id=upload-box class="box-blue angle">
<div class=box-bg>
<div class=box-body>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7963911354665843";
/* CHf */
google_ad_slot = "4696250819";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div>
</div>

<div id=view-tag class="box-blue angle">
<div class=box-bg>
<div class=box-title>经验标签</div>
<div id=tag-list class=box-body>
	
		<a href="/lib/tag/Go语言">Go语言</a>
	 
</div>

</div>
</div>
<div id=view-topic class="box-blue angle">
<div class=box-bg>
<div class=box-title>同类热门经验</div>
<div class=box-body>
	<ul id=topic-list class=file-shortlist>
		
			<li>
				<span class="samelist"></span><a title=顺手的Go语言编辑器 href="/lib/view/open1346379386453.html"><span class=title>顺手的Go语言编辑器</span></a>
				<div class=attribute><span>2682次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=Go 语言版的 OpenCV 封装 - GoOpenCV href="/lib/view/open1341845443166.html"><span class=title>Go 语言版的 OpenCV 封装 - GoOpenCV</span></a>
				<div class=attribute><span>2213次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=Go 语言开发的宠物小精灵游戏 - Pokemon Universe href="/lib/view/open1341845526354.html"><span class=title>Go 语言开发的宠物小精灵游戏 - Pokemon Universe</span></a>
				<div class=attribute><span>1987次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=Go语言的fmt包中文教程 href="/lib/view/open1352593106824.html"><span class=title>Go语言的fmt包中文教程</span></a>
				<div class=attribute><span>1916次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=MySQL的Go驱动 GoMySQL href="/lib/view/open1341845639447.html"><span class=title>MySQL的Go驱动 GoMySQL</span></a>
				<div class=attribute><span>1854次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=搜索引擎Sphinx的Go开发包 GoSphinx href="/lib/view/open1341878672072.html"><span class=title>搜索引擎Sphinx的Go开发包 GoSphinx</span></a>
				<div class=attribute><span>1821次浏览</span></div>
			</li>
		
</ul>
</div>
</div>
</div>

<div id=view-top-category class="box-blue angle-header">
<div class=box-bg>
<div class=box-title>相关经验</div>
<div class=box-body>
<ul id=top-list class=file-shortlist>
		
			<li><span class="samelist"></span><a title=Go 语言中漂亮的并发特性 href="/lib/view/open1368955943091.html" target=_blank><span
				class=title>Go 语言中漂亮的并发特性</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的MySQL驱动： Go MySQL Driver href="/lib/view/open1348032676255.html" target=_blank><span
				class=title>Go语言的MySQL驱动： Go MySQL Driver</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的Oracle 驱动：go-oci8 href="/lib/view/open1348032438318.html" target=_blank><span
				class=title>Go语言的Oracle 驱动：go-oci8</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=XMPP 协议的 GO 语言实现 - go-xmpp href="/lib/view/open1333976043608.html" target=_blank><span
				class=title>XMPP 协议的 GO 语言实现 - go-xmpp</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=顺手的Go语言编辑器 href="/lib/view/open1346379386453.html" target=_blank><span
				class=title>顺手的Go语言编辑器</span></a><br>
			<div class=attribute><span class="score stars-small-10" title=经验评价得分：5.0分>&nbsp;</span> <span>1人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的Web开发框架 Web.Go href="/lib/view/open1323762663531.html" target=_blank><span
				class=title>Go语言的Web开发框架 Web.Go</span></a><br>
			<div class=attribute><span class="score stars-small-8" title=经验评价得分：4.0分>&nbsp;</span> <span>1人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言写的随机森林库：RF.go href="/lib/view/open1353035738832.html" target=_blank><span
				class=title>Go语言写的随机森林库：RF.go</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=GoLang 的时间处理 href="/lib/view/open1388716595266.html" target=_blank><span
				class=title>GoLang 的时间处理</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=MongoDB 的 GO 语言驱动包 mgo href="/lib/view/open1333976259842.html" target=_blank><span
				class=title>MongoDB 的 GO 语言驱动包 mgo</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的ORM库：go-xorm  href="/lib/view/open1368324853235.html" target=_blank><span
				class=title>Go语言的ORM库：go-xorm </span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的函数调用信息 href="/lib/view/open1388915989578.html" target=_blank><span
				class=title>Go语言的函数调用信息</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=go语言的web框架：xweb  href="/lib/view/open1371963939057.html" target=_blank><span
				class=title>go语言的web框架：xweb </span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=memcached 的 go 语言开发包 - gomemcached href="/lib/view/open1333975962983.html" target=_blank><span
				class=title>memcached 的 go 语言开发包 - gomemcached</span></a><br>
			<div class=attribute><span class="score stars-small-10" title=经验评价得分：5.0分>&nbsp;</span> <span>1人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=go语言的路由分发包 href="/lib/view/open1374328590949.html" target=_blank><span
				class=title>go语言的路由分发包</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
</ul>
</div>
</div>
<div class=box_3></div>
<div class=box_2></div>
<div class=box_1></div>

</div>

<div id=view-top-category class="box-blue angle-header">
<div class=box-bg>
<div class=box-title>相关讨论 - <a href="http://www.open-open.com/bbs" target="_blank" rel="nofollow">更多</a></div>
<div class=box-body>
<ul id=top-list class=file-shortlist>
		
			<li >
			<span class="samelist"></span><a title=JDBC 介绍 href="http://www.open-open.com/bbs/view/1320398168967" rel="nofollow" target=_blank><span class=title>JDBC 介绍</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=我讨厌剪切粘贴 href="http://www.open-open.com/bbs/view/1325123392514" rel="nofollow" target=_blank><span class=title>我讨厌剪切粘贴</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=10个用于操作字符串的 PHP代码片段 href="http://www.open-open.com/bbs/view/1319418003108" rel="nofollow" target=_blank><span class=title>10个用于操作字符串的 PHP代码片段</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=[转载]C语言 格式化字符  href="http://www.open-open.com/bbs/view/1318518004483" rel="nofollow" target=_blank><span class=title>[转载]C语言 格式化字符 </span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=浅谈JavaScript编程语言的编码规范 href="http://www.open-open.com/bbs/view/1318472833218" rel="nofollow" target=_blank><span class=title>浅谈JavaScript编程语言的编码规范</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=30本免费的编程电子书籍(英文) href="http://www.open-open.com/bbs/view/1318343599405" rel="nofollow" target=_blank><span class=title>30本免费的编程电子书籍(英文)</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=持续集成之戏说Check-in Dance href="http://www.open-open.com/bbs/view/1326292902296" rel="nofollow" target=_blank><span class=title>持续集成之戏说Check-in Dance</span></a>
		</li>
		
</ul>
</div>
</div>
<div class=box_3></div>
<div class=box_2></div>
<div class=box_1></div>

</div>

<!-- end top list--></div>
</div>




<div id=footer>
<div id=footer-menu><a href="http://www.open-open.com/home/1">联系我们</a> - <a href="http://www.open-open.com/home/1">问题反馈</a> </div>
<p>2005-2013 OPEN-OPEN, all rights reserved.</p>
</div>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="/lib/js/thickbox.patch.js"></script>

<script type="text/javascript" src="/lib/js/app.js"></script>
<script type="text/javascript" src="/lib/js/scrolltopcontrol.js"></script>
<script type="text/javascript">
	var rooturl="/lib";
	var tb_pathToImage = "/lib/images/loadingAnimation.gif";
	
  	
</script>
<script type="text/javascript" src="http://libs.baidu.com/jqueryui/1.8.22/jquery-ui.min.js"></script>
<script type="text/javascript" src="/lib/js/scrolltopcontrol.js"></script>
<script type="text/javascript" src="/lib/js/view.js"></script>
<script type="text/javascript" src="/lib/syntaxhighlighter_2.1.382/scripts/shCore.js"></script>
<script type="text/javascript" src="/lib/syntaxhighlighter_2.1.382/scripts/shBrush.js"></script>

<script type="text/javascript">
  	scrolltotop.offset(95,165);
	scrolltotop.init();
  </script>
<script type="text/javascript">
	SyntaxHighlighter.config.clipboardSwf = '/lib/syntaxhighlighter_2.1.382/scripts/clipboard.swf';
	//SyntaxHighlighter.defaults['collapse'] = true; 
	SyntaxHighlighter.config.strings.expandSource = "展开代码";
	SyntaxHighlighter.config.strings.copyToClipboard = "复制到剪切板";
	SyntaxHighlighter.config.strings.copyToClipboardConfirmation = "代码已经复制到剪切板";
	SyntaxHighlighter.config.strings.viewSource = "查看源码";
	SyntaxHighlighter.config.strings.print = "打印";
	SyntaxHighlighter.all();
</script>

<!-- Baidu Button BEGIN -->
<script type="text/javascript" id="bdshare_js" data="type=slide&amp;img=0&amp;pos=right&amp;uid=6734290" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
var bds_config={"bdTop":256};
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);
</script>
<!-- Baidu Button END --></body>
</html>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='zh-CN' xml:lang='zh-CN' xmlns='http://www.w3.org/1999/xhtml'>

<head>
<title>Go语言的时间格式风格详解 - OPEN 开发经验库</title>
<meta content="text/html; charset=utf-8" http-equiv=content-type>
<meta name=robots content=index,follow>
<meta name=keywords content="Go语言,Google Go开发">
<meta name=description content="go 的time package 提供了time.Format函数，用来对时间进行格式化输出。

类似的还有time.Parse用来解析字符串类型的时间到time.Time。这是两个互逆的函数。

问题是，go 采用的格式化 layout 和我们以往所用的任何经验都不同。以至于初次接触总是一头雾 水。

其实 go 提供的这个 layout 对算法的实现非常科学高效，而且很规律。下面我们详细分解下。

">
<link rel="shortcut icon" href="/lib/favicon.ico">
<link rel=copyright href="http://www.open-open.com/">



<link type="text/css" rel="stylesheet" href="/lib/syntaxhighlighter_2.1.382/styles/shCore.css"/>
<link type="text/css" rel="stylesheet" href="/lib/syntaxhighlighter_2.1.382/styles/shThemeEclipse.css"/>
 
<style type="text/css" media="screen, projection">
		/*<![CDATA[*/
			@import "/lib/css/common.css";
			@import "/lib/css/main.css";
			@import "/lib/css/thickbox.css";
			@import "/lib/css/jquery.ui.css";
		/*]]>*/
</style> 



<script type="text/javascript">
	var rooturl="/lib";
	var wgDocKey='1372919144628';
	var wgDocTitle='Go语言的时间格式风格详解';
	var wgDocStatusFlag='';
	var wgUserFolders=null;
	var wgDownFrame=null;
	var wgCostByUser=null;
	var wgDocFavoriteByUser=false;
	var wgDocScoreByUser=null;
	var wgUserLogined=0;
	var tb_pathToImage = "/lib/images/loadingAnimation.gif";


</script>
</head>
<body id=view>

        


<div id=topnav>
<div id=Personal>
	
		<a href="/lib/members/login?keepThis=true&TB_iframe=true&height=177&width=280" title="登录OPEN经验库" class="thickbox"">登录</a>&nbsp;&nbsp;
		<a href="/lib/members/register?keepThis=true&TB_iframe=true&height=460&width=710" title="注册新的账号" class="thickbox">注册</a>
	
		
</div>
<div id=topmenu>
<ul>
		<li><a title=Java开源 href="http://www.open-open.com/">Java开源</a></li>
		<li><a title=PHP开源 href="http://www.php-open.com/">PHP开源</a></li>
		<li><a title=JS脚本大全 href="http://www.open-open.com/ajax/">JS脚本大全</a></li>
		<li><a title=OPEN家园 href="http://www.open-open.com/home/">OPEN家园</a></li>
		<li class=selected>OPEN经验库</li>
		<li><a title='OPEN文档频道' href="http://www.open-open.com/doc/">OPEN文档</a></li>
		<li><a title='OPEN资讯频道' href="http://www.open-open.com/news/">OPEN资讯</a></li>
		<li><a title='OPEN论坛频道' href="http://www.open-open.com/bbs">OPEN论坛</a></li>
		

</ul>
</div>
</div>
<!--end top nav-->
<div id=head>
<div id=head-logo><a title=OPEN开发经验库 href="http://www.open-open.com/lib/"><img border=0 alt=OPEN开发经验库 src="/lib/images/logo.jpg"></a></div>
<div id=head-search>
<form method=get name=search action="/lib/search" accept-charset="GBK" onsubmit="document.charset='GBK';">

<table border=0 cellspacing=0 cellpadding=0>
		
		<tbody>
				<tr>
						<td align=left>
							<input id=searchinput maxlength="1048" style="height: 23px;font-size:18px"  value="" x-webkit-speech size=45 name=q>
							<input id=searchbutton value="经验搜索" type="submit" style="height: 28px;font-size:17">
							<input id=od  type=hidden name=od value="0">
&nbsp;&nbsp;&nbsp;&nbsp;<font style="font-size: 9.5pt"><b>推荐：</b></font><a href="http://www.miniui.com/demo/#src=datagrid/celledit.html" title="jQuery MiniUI，Web界面控件库！" target="_blank" rel="nofollow"><font color="red" style="font-size: 9.5pt"><b>jQuery MiniUI，Web界面控件库！</b></font></a>
						</td>
						</tr>
		</tbody>
</table>
</form>

</div>
<div id=head-ad>

</div>

</div>
<!-- end head -->

<div id=content>
<div id=content-nav>
<a href="/lib/list/all">所有分类</a>

	&nbsp;&gt;&nbsp;
	<a href="/lib/list/36">开发语言与工具</a>

	&nbsp;&gt;&nbsp;
	<a href="/lib/list/211">Google Go开发</a>

</div>


<div id=view-main>


<div id=view-titleh>
<div id=view-title>
	<h3>Go语言的时间格式风格详解</h3>
</div>
<div id=view-summary>
<table>
		<tbody>
				<tr>
						<td><strong>您的评价</strong>:</td>
						<td>
						<div id=rate class=rate-container><span id=star1 class=star-big-off title=很差>&nbsp;</span><span id=star2 class=star-big-off title=较差>&nbsp;</span><span id=star3 class=star-big-off title=还行>&nbsp;</span><span
								id=star4 class=star-big-off title=不错>&nbsp;</span><span id=star5 class=star-big-off title=力荐>&nbsp;</span></div>
						</td>
						<td width=30>
						<div id=rate-tip></div>
						</td>
						
						<td>
						<div id=favorite-container><span class="icon favorite">&nbsp;</span><a id=favorite href="javascript:void(0)"><strong>收藏该经验</strong></a>&nbsp;&nbsp;&nbsp;&nbsp;
						 </div>

</td>
				</tr>
		</tbody>
</table>
<div id=favorite-box>
<table>
		<tbody>
				<tr>
						<td width=70 align=right>文件夹</td>
						<td><select id=fav_folderlist name=folder>
								<option selected value=0>请选择...</option>
								<option id=newfolder-sp disabled value="">-------------</option>
								<option value=-1>新增文件夹...</option>
						</select></td>
				</tr>
				<tr style="display: none" id=newfolder-input>
						<td align=right>新增文件夹</td>
						<td><input id=fav_newfolder maxlength=50 type=text name=newfolder></td>
				</tr>
				<tr>
						<td align=right>标签</td>
						<td><input id=fav_tags maxlength=135 size=20 type=text name=tags></td>
				</tr>
				<tr>
						<td></td>
						<td colspan=2>(多个标签用逗号分隔)</td>
				</tr>
		</tbody>
</table>
</div>

</div>

</div>


<div id=readercontainer>
 <div id="toc"></div>
<!-- google_ad_section_start -->
<h2>time package</h2>
<p>go 的time package 提供了time.Format函数，用来对时间进行格式化输出。</p>
<p>类似的还有time.Parse用来解析字符串类型的时间到time.Time。这是两个互逆的函数。</p>
<p>问题是，go 采用的格式化 layout 和我们以往所用的任何经验都不同。以至于初次接触总是一头雾 水。</p>
<p>其实 go 提供的这个 layout 对算法的实现非常科学高效，而且很规律。下面我们详细分解下。</p>
<h2>直接上个对应表</h2>
<p>前面是含义，后面是 go 的表示值,多种表示,逗号","分割</p>
<ul>
<li>月份 1,01,Jan,January</li>
<li>日　 2,02,_2</li>
<li>时　 3,03,15,PM,pm,AM,am</li>
<li>分　 4,04</li>
<li>秒　 5,05</li>
<li>年　 06,2006</li>
<li>时区 -07,-0700,Z0700,Z07:00,-07:00,MST</li>
<li>周几 Mon,Monday</li>
</ul>
<p>您看出规律了么！哦是的，你发现了，这里面没有一个是重复的，所有的值表示都唯一对应一个时间部分。并且涵盖了很多格式组合。</p>
<h3>比如小时的表示(原定义是下午3时，也就是15时)</h3>
<ul>
<li>3 用12小时制表示，去掉前导0</li>
<li>03 用12小时制表示，保留前导0</li>
<li>15 用24小时制表示，保留前导0</li>
<li>03pm 用24小时制am/pm表示上下午表示，保留前导0</li>
<li>3pm 用24小时制am/pm表示上下午表示，去掉前导0</li>
</ul>
<p>又比如月份</p>
<ul>
<li>1 数字表示月份，去掉前导0</li>
<li>01 数字表示月份，保留前导0</li>
<li>Jan 缩写单词表示月份</li>
<li>January 全单词表示月份</li>
</ul>
<h3>实例对应</h3>
<p>真实时间：我的UTC时间是 2013年12月5日，我的本地时区是Asia</p>
<p>字符表示：　　2013 12 5 Asia</p>
<p>Go Layout：　2006 01 2 MST</p>
<p>真实时间：我的UTC时间是 2013年12月22点，我的本地时区是Asia</p>
<p>字符表示：　　2013 12 22 Asia</p>
<p>Go Layout：　2006 01 15 MST</p>
<p>是滴，上面这个时间是合法的，虽然没有说是那一天，但是说了小时</p>
<p>而所有这些数字的顺序正好是1,2,4,5,6,7和一个时区MST</p>
<p>其实还有一个秒的 repeated digits for fractional seconds 表示法</p>
<p>用的是 0和9 ,很少用，源代码里面是这样写的</p>
<div id="highlighter_112464" class="syntaxhighlighter ">
<div class="lines">
<div class="line alt1"><pre class="brush:cpp; toolbar: true; auto-links: false;">stdFracSecond0                          // ".0", ".00", ... , trailing zeros included
stdFracSecond9                          // ".9", ".99", ..., trailing zeros omitted</pre><br />
</div>
</div>
</div>
<h2>那些分界符</h2>
<p>除了那些值之外的都是分界符号，自然匹配了，直接举例子吧</p>
<p>字符表示：　　2013-12 21 Asia</p>
<p>Go Layout：　2006-01 15 MST</p>
<p>字符表示：　　2013年12月21时 时区Asia</p>
<p>Go Layout：　2006年01月15时 时区MST</p>
<p>好了，您是否感觉这个表示方法兼容度更好，适应性更强呢，更容易记忆呢。</p>


</div>

<div style="margin-top: 10px;margin-bottom: 2px;">
<script type="text/javascript"><!--
google_ad_client = "pub-7963911354665843";
/* 728x90, 创建于 11-1-27 */
google_ad_slot = "5890482646";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>

			<table width='100%'><tr>
				<td  valign='top' width="49%" class="Related">
                <div style="border-bottom: 1px #ccc solid;margin-top: 5px"><strong>相关资讯</strong> 　—　<a href="http://www.open-open.com/news" target="_blank" rel="nofollow">更多</a></div>
            	<ul>
            		
            	     <li><a href="http://www.open-open.com/news/view/1894f94" target="_blank" rel="nofollow" title="使用Go语言一段时间的感受">使用Go语言一段时间的感受</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/9825e0" target="_blank" rel="nofollow" title="走进 Google 的 Go 语言">走进 Google 的 Go 语言</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/8465e6" target="_blank" rel="nofollow" title="Go 语言的错误处理机制引发争议">Go 语言的错误处理机制引发争议</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/14a867b" target="_blank" rel="nofollow" title="Go 语言的高级并发模式">Go 语言的高级并发模式</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1c0a316" target="_blank" rel="nofollow" title="从零到 Go：24 小时内登上 Google 主页的 Go 语言应用“火鸡”doodle 开发纪实">从零到 Go：24 小时内登上 Google 主页的 Go 语言应用“火鸡”doodle 开发纪实</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1dde1dc" target="_blank" rel="nofollow" title="未来的云计算语言？Go 在 Google 内部崛起">未来的云计算语言？Go 在 Google 内部崛起</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1097813" target="_blank" rel="nofollow" title="为什么 SoundCloud 要使用 Go 语言以及如何使用">为什么 SoundCloud 要使用 Go 语言以及如何使用</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/13cc91c" target="_blank" rel="nofollow" title="谈一点对 go 和 erlang 两门语言的体会">谈一点对 go 和 erlang 两门语言的体会</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/99d0f6" target="_blank" rel="nofollow" title="Go语言 - 清晰，优雅，但却是错的">Go语言 - 清晰，优雅，但却是错的</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/327263" target="_blank" rel="nofollow" title="为什么不使用Go语言呢？">为什么不使用Go语言呢？</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/19a059f" target="_blank" rel="nofollow" title="用 Google App Engine 开发 Go 语言应用的简明教程">用 Google App Engine 开发 Go 语言应用的简明教程</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/58b627" target="_blank" rel="nofollow" title="Go语言的可视化开发工具，LiteIDE x14.0发布">Go语言的可视化开发工具，LiteIDE x14.0发布</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/6836b0" target="_blank" rel="nofollow" title="Go 编程语言刚发布了 Go 1 released了！">Go 编程语言刚发布了 Go 1 released了！</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/19c5949" target="_blank" rel="nofollow" title="简单而强大的Go语言ORM框架 ，xorm v0.3.1 发布,">简单而强大的Go语言ORM框架 ，xorm v0.3.1 发布,</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/67ae4c" target="_blank" rel="nofollow" title="Go 语言 4 周岁生日">Go 语言 4 周岁生日</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/13696de" target="_blank" rel="nofollow" title="为什么Android应该转为Go语言开发？">为什么Android应该转为Go语言开发？</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/e92d7e" target="_blank" rel="nofollow" title="为什么我不会舍弃 Python 投奔 Go 语言">为什么我不会舍弃 Python 投奔 Go 语言</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/15be16c" target="_blank" rel="nofollow" title="开源书籍《Go Web编程》《Build Web Application with Golang》">开源书籍《Go Web编程》《Build Web Application with Golang》</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1f9e6d7" target="_blank" rel="nofollow" title="Google抛弃C语言，采用Go语言重写Go编译器">Google抛弃C语言，采用Go语言重写Go编译器</a></li>            
            	     
            	     <li><a href="http://www.open-open.com/news/view/1ce4e74" target="_blank" rel="nofollow" title="为什么 C++ 程序员不想改用 Go 语言">为什么 C++ 程序员不想改用 Go 语言</a></li>            
            	     
            	     
            	</ul>
        		 <div style="clear: both; font-size: 1px; line-height: 0;"></div>
            </td>
			<td width="5px"></td>
			<td valign='top' width="49%" class="Relatedb">
			 	<div style="border-bottom: 1px #ccc solid;margin-top: 5px"><strong>相关文档</strong> 　—　<a href="http://www.open-open.com/doc" rel="nofollow" target="_blank">更多</a></div>
            	<ul >
            		
            	     <li><a  href="http://www.open-open.com/doc/view/8d63d4cb4f7f4fbe9a890432b548faa8" rel="nofollow" target="_blank" title="Effective Go.pdf">Effective Go.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/444b4b920e054b2298ec05cca80631b5" rel="nofollow" target="_blank" title="Google Go初级读本.pdf">Google Go初级读本.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/8aa3a31dca5f4431a2e30a9183469c97" rel="nofollow" target="_blank" title="Google Go 编程语言.pdf">Google Go 编程语言.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/db4a3083bf7345db830214933ff75c59" rel="nofollow" target="_blank" title="Google Go 编程语言.pdf">Google Go 编程语言.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/23b01993ee2d4ea1b51ca4fe3e753d5c" rel="nofollow" target="_blank" title="Go 语言网络编程.pdf">Go 语言网络编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/cad7048e32b04b4985828b97bfe40c1c" rel="nofollow" target="_blank" title="Go 语言最佳实践.pdf">Go 语言最佳实践.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/a0dda777feec49ac96ebf71d175037f7" rel="nofollow" target="_blank" title="Go 语言程序设计(全).pdf">Go 语言程序设计(全).pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/72928010dd424fe2bd3605b1fd5a7cd6" rel="nofollow" target="_blank" title="Go 语言文档.doc">Go 语言文档.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/552bc864c7da4d439936709b387357e0" rel="nofollow" target="_blank" title="Go 语言文档.doc">Go 语言文档.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/e72cec70e5fe45c58b554bb7755235fd" rel="nofollow" target="_blank" title="Go 语言文档.doc">Go 语言文档.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/7c041445129b414d884536c125a35bac" rel="nofollow" target="_blank" title="Go 语言编程.pdf">Go 语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/9b3e3101669640cfad71e12e1719fbd1" rel="nofollow" target="_blank" title="Go 语言编程.pdf">Go 语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/2fbc468458994cb4b60e790ef65cad2d" rel="nofollow" target="_blank" title="Go语言编程.pdf">Go语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/27a7bd97e8614662b02188462ac5d1f8" rel="nofollow" target="_blank" title="Go 语言编程.pdf">Go 语言编程.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/d4258fc14d8d4622a092d89106b40121" rel="nofollow" target="_blank" title="Go语言WEB开发.pdf">Go语言WEB开发.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/7ee3f2fc285b46638aad59132cc0616c" rel="nofollow" target="_blank" title="Go 编程语言简介.doc">Go 编程语言简介.doc</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/3811f9426dce4ff9838209f46d1be5e3" rel="nofollow" target="_blank" title="Go语言学习笔记.pdf">Go语言学习笔记.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/5390ffdb367a4528a45cbee5b6346525" rel="nofollow" target="_blank" title="Go 语言程序设计.pdf">Go 语言程序设计.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/106a5a5d3890484ab514e116dca36763" rel="nofollow" target="_blank" title="Go语言程序设计.pdf">Go语言程序设计.pdf</a></li>            
            	    
            	     <li><a  href="http://www.open-open.com/doc/view/020181b97f6e499b8e4580e6edaf1a55" rel="nofollow" target="_blank" title="谷歌GO语言集成开发环境LiteIDE使用帮助.pdf">谷歌GO语言集成开发环境LiteIDE使用帮助.pdf</a></li>            
            	    
            	</ul>
            </td>
			</tr></table>
<div style="margin-top: 10px;margin-bottom: 10px;">
<div id="baiduad1" style="margin-bottom: 5px;">
</div>	

</div>

<div style="margin-top: 10px;margin-bottom: 2px;">
<script type="text/javascript"><!--
google_ad_client = "pub-7963911354665843";
/* 728x90, 创建于 11-1-27 */
google_ad_slot = "5890482646";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>

<div style="margin-top: 10px;margin-bottom: 10px;">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7963911354665843";
/* 横向单元 */
google_ad_slot = "6546082871";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>	
	
</div>

<div id=view-side>
<div id=upload-box class="box-blue angle">
<div class=box-bg>
<div class=box-body><a id=upload class=upload href="#"></a>
</div>
</div>
</div>

<div class="box-blue angle-footer">
<div class=box_1></div>
<div class=box_2></div>
<div class=box_3></div>
<div class=box-bg>
<div class=box-title>内容信息</div>
<div id=docinfo class=box-body>
<div id=doc-score><span id=score-stars class=stars-big-0 title=经验评价得分：0.0分>&nbsp;</span><span id=score-num>0.0</span><br>
<div id=score-ratecount>(已有0个人评价)</div>
<div id=score-scale>
<span class="starscale stars-small-10" title=力荐>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-8" title=不错>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-6" title=还行>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-4" title=较差>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
<span class="starscale stars-small-2" title=很差>&nbsp;</span>
<div style="width: 0px" class=power></div>
0%<br>
</div>
</div>
<div class=sp></div>
<div id=doc-status>
<span class=item>收藏：0人</span>

<span class=item>发布时间：2013-07-04 16:11:33</span>
</div>
</div>
</div>
</div>

<div id=upload-box class="box-blue angle">
<div class=box-bg>
<div class=box-body>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7963911354665843";
/* CHf */
google_ad_slot = "4696250819";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div>
</div>

<div id=view-tag class="box-blue angle">
<div class=box-bg>
<div class=box-title>经验标签</div>
<div id=tag-list class=box-body>
	
		<a href="/lib/tag/Go语言">Go语言</a>
	 
</div>

</div>
</div>
<div id=view-topic class="box-blue angle">
<div class=box-bg>
<div class=box-title>同类热门经验</div>
<div class=box-body>
	<ul id=topic-list class=file-shortlist>
		
			<li>
				<span class="samelist"></span><a title=顺手的Go语言编辑器 href="/lib/view/open1346379386453.html"><span class=title>顺手的Go语言编辑器</span></a>
				<div class=attribute><span>2683次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=Go 语言版的 OpenCV 封装 - GoOpenCV href="/lib/view/open1341845443166.html"><span class=title>Go 语言版的 OpenCV 封装 - GoOpenCV</span></a>
				<div class=attribute><span>2214次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=Go 语言开发的宠物小精灵游戏 - Pokemon Universe href="/lib/view/open1341845526354.html"><span class=title>Go 语言开发的宠物小精灵游戏 - Pokemon Universe</span></a>
				<div class=attribute><span>1987次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=Go语言的fmt包中文教程 href="/lib/view/open1352593106824.html"><span class=title>Go语言的fmt包中文教程</span></a>
				<div class=attribute><span>1918次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=MySQL的Go驱动 GoMySQL href="/lib/view/open1341845639447.html"><span class=title>MySQL的Go驱动 GoMySQL</span></a>
				<div class=attribute><span>1855次浏览</span></div>
			</li>
		
			<li>
				<span class="samelist"></span><a title=搜索引擎Sphinx的Go开发包 GoSphinx href="/lib/view/open1341878672072.html"><span class=title>搜索引擎Sphinx的Go开发包 GoSphinx</span></a>
				<div class=attribute><span>1821次浏览</span></div>
			</li>
		
</ul>
</div>
</div>
</div>

<div id=view-top-category class="box-blue angle-header">
<div class=box-bg>
<div class=box-title>相关经验</div>
<div class=box-body>
<ul id=top-list class=file-shortlist>
		
			<li><span class="samelist"></span><a title=Go 语言中漂亮的并发特性 href="/lib/view/open1368955943091.html" target=_blank><span
				class=title>Go 语言中漂亮的并发特性</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的MySQL驱动： Go MySQL Driver href="/lib/view/open1348032676255.html" target=_blank><span
				class=title>Go语言的MySQL驱动： Go MySQL Driver</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的Oracle 驱动：go-oci8 href="/lib/view/open1348032438318.html" target=_blank><span
				class=title>Go语言的Oracle 驱动：go-oci8</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=XMPP 协议的 GO 语言实现 - go-xmpp href="/lib/view/open1333976043608.html" target=_blank><span
				class=title>XMPP 协议的 GO 语言实现 - go-xmpp</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=顺手的Go语言编辑器 href="/lib/view/open1346379386453.html" target=_blank><span
				class=title>顺手的Go语言编辑器</span></a><br>
			<div class=attribute><span class="score stars-small-10" title=经验评价得分：5.0分>&nbsp;</span> <span>1人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的Web开发框架 Web.Go href="/lib/view/open1323762663531.html" target=_blank><span
				class=title>Go语言的Web开发框架 Web.Go</span></a><br>
			<div class=attribute><span class="score stars-small-8" title=经验评价得分：4.0分>&nbsp;</span> <span>1人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言写的随机森林库：RF.go href="/lib/view/open1353035738832.html" target=_blank><span
				class=title>Go语言写的随机森林库：RF.go</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=GoLang 的时间处理 href="/lib/view/open1388716595266.html" target=_blank><span
				class=title>GoLang 的时间处理</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=MongoDB 的 GO 语言驱动包 mgo href="/lib/view/open1333976259842.html" target=_blank><span
				class=title>MongoDB 的 GO 语言驱动包 mgo</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的ORM库：go-xorm  href="/lib/view/open1368324853235.html" target=_blank><span
				class=title>Go语言的ORM库：go-xorm </span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=Go语言的函数调用信息 href="/lib/view/open1388915989578.html" target=_blank><span
				class=title>Go语言的函数调用信息</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=go语言的web框架：xweb  href="/lib/view/open1371963939057.html" target=_blank><span
				class=title>go语言的web框架：xweb </span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=memcached 的 go 语言开发包 - gomemcached href="/lib/view/open1333975962983.html" target=_blank><span
				class=title>memcached 的 go 语言开发包 - gomemcached</span></a><br>
			<div class=attribute><span class="score stars-small-10" title=经验评价得分：5.0分>&nbsp;</span> <span>1人评</span>
			</div>
		</li>
		
			<li><span class="samelist"></span><a title=go语言的路由分发包 href="/lib/view/open1374328590949.html" target=_blank><span
				class=title>go语言的路由分发包</span></a><br>
			<div class=attribute><span class="score stars-small-0" title=经验评价得分：0.0分>&nbsp;</span> <span>0人评</span>
			</div>
		</li>
		
</ul>
</div>
</div>
<div class=box_3></div>
<div class=box_2></div>
<div class=box_1></div>

</div>

<div id=view-top-category class="box-blue angle-header">
<div class=box-bg>
<div class=box-title>相关讨论 - <a href="http://www.open-open.com/bbs" target="_blank" rel="nofollow">更多</a></div>
<div class=box-body>
<ul id=top-list class=file-shortlist>
		
			<li >
			<span class="samelist"></span><a title=JDBC 介绍 href="http://www.open-open.com/bbs/view/1320398168967" rel="nofollow" target=_blank><span class=title>JDBC 介绍</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=我讨厌剪切粘贴 href="http://www.open-open.com/bbs/view/1325123392514" rel="nofollow" target=_blank><span class=title>我讨厌剪切粘贴</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=10个用于操作字符串的 PHP代码片段 href="http://www.open-open.com/bbs/view/1319418003108" rel="nofollow" target=_blank><span class=title>10个用于操作字符串的 PHP代码片段</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=[转载]C语言 格式化字符  href="http://www.open-open.com/bbs/view/1318518004483" rel="nofollow" target=_blank><span class=title>[转载]C语言 格式化字符 </span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=浅谈JavaScript编程语言的编码规范 href="http://www.open-open.com/bbs/view/1318472833218" rel="nofollow" target=_blank><span class=title>浅谈JavaScript编程语言的编码规范</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=30本免费的编程电子书籍(英文) href="http://www.open-open.com/bbs/view/1318343599405" rel="nofollow" target=_blank><span class=title>30本免费的编程电子书籍(英文)</span></a>
		</li>
		
			<li >
			<span class="samelist"></span><a title=持续集成之戏说Check-in Dance href="http://www.open-open.com/bbs/view/1326292902296" rel="nofollow" target=_blank><span class=title>持续集成之戏说Check-in Dance</span></a>
		</li>
		
</ul>
</div>
</div>
<div class=box_3></div>
<div class=box_2></div>
<div class=box_1></div>

</div>

<!-- end top list--></div>
</div>




<div id=footer>
<div id=footer-menu><a href="http://www.open-open.com/home/1">联系我们</a> - <a href="http://www.open-open.com/home/1">问题反馈</a> </div>
<p>2005-2013 OPEN-OPEN, all rights reserved.</p>
</div>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="/lib/js/thickbox.patch.js"></script>

<script type="text/javascript" src="/lib/js/app.js"></script>
<script type="text/javascript" src="/lib/js/scrolltopcontrol.js"></script>
<script type="text/javascript">
	var rooturl="/lib";
	var tb_pathToImage = "/lib/images/loadingAnimation.gif";
	
  	
</script>
<script type="text/javascript" src="http://libs.baidu.com/jqueryui/1.8.22/jquery-ui.min.js"></script>
<script type="text/javascript" src="/lib/js/scrolltopcontrol.js"></script>
<script type="text/javascript" src="/lib/js/view.js"></script>
<script type="text/javascript" src="/lib/syntaxhighlighter_2.1.382/scripts/shCore.js"></script>
<script type="text/javascript" src="/lib/syntaxhighlighter_2.1.382/scripts/shBrush.js"></script>

<script type="text/javascript">
  	scrolltotop.offset(95,165);
	scrolltotop.init();
  </script>
<script type="text/javascript">
	SyntaxHighlighter.config.clipboardSwf = '/lib/syntaxhighlighter_2.1.382/scripts/clipboard.swf';
	//SyntaxHighlighter.defaults['collapse'] = true; 
	SyntaxHighlighter.config.strings.expandSource = "展开代码";
	SyntaxHighlighter.config.strings.copyToClipboard = "复制到剪切板";
	SyntaxHighlighter.config.strings.copyToClipboardConfirmation = "代码已经复制到剪切板";
	SyntaxHighlighter.config.strings.viewSource = "查看源码";
	SyntaxHighlighter.config.strings.print = "打印";
	SyntaxHighlighter.all();
</script>

<!-- Baidu Button BEGIN -->
<script type="text/javascript" id="bdshare_js" data="type=slide&amp;img=0&amp;pos=right&amp;uid=6734290" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
var bds_config={"bdTop":256};
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000);
</script>
<!-- Baidu Button END --></body>
</html>
